/* *****************************************************************************
 * JFab (http://code.google.com/p/jfab)
 * Copyright (c) 2011 JFab.org
 * Admin jfab@jeffreythompson.net
 *
 * See the file "LICENSE.txt" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 * *****************************************************************************/


package org.jfab.core.collection;

import org.jfab.core.model.CGParameter;

import java.util.ArrayList;
import java.util.Collection;


/**
 * Provides a parameter name list.
 */
public class ParameterNameList extends CGList<String>
{
    /**
     * Construct this object.
     */
    public ParameterNameList()
    {
        super(new ArrayList<String>());
    }

    /**
     * Construct this object with the given parameter.
     *
     * @param  parameters  Parameters.
     */
    public ParameterNameList(CGParameterList parameters)
    {
        this();

        for (CGParameter parameter : parameters)
        {
            add(parameter.getName());
        }
    }

    /**
     * Construct this object with the given parameter.
     *
     * @param  parameterNames  Parameter names.
     */
    public ParameterNameList(Collection<String> parameterNames)
    {
        this();

        getList().addAll(parameterNames);
    }
}
